package beans;

public class Question {
	private String first;
	private String second;
	private String A;
	private String B;
	private String C;
	private String D;
	private String answer = "";
	private int score;
	private int level;
	private String[] ans = { "A", "B", "C", "D" };

	public Question(String first, String second, String a, String b, String c, String d) {
		super();
		this.first = first;
		this.second = second;
		A = a;
		B = b;
		C = c;
		D = d;
		D = d;
		String[] str = this.first.split("\\,");
		String st = str[0].substring(str[0].indexOf("=") + 1);
		String[] ss = st.split("\\/");
		for (int i = 0; i < ss.length; i++) {
			this.answer += ans[Integer.parseInt(ss[i])];
		}
		this.score = Integer.parseInt(str[1].substring(str[1].indexOf("=") + 1));
		this.level = Integer.parseInt(str[2].substring(str[2].indexOf("=") + 1));
	}

	public String getfirst() {
		return first;
	}

	public String getsecond() {
		return second;
	}

	public String getA() {
		return A;
	}

	public String getB() {
		return B;
	}

	public String getC() {
		return C;
	}

	public String getD() {
		return D;
	}

	public void setfirst(String first) {
		this.first = first;
	}

	public String getAnswer() {
		return answer;
	}

	public void setAnswer(String answer) {
		this.answer = answer;
	}

	public int getScore() {
		return score;
	}

	public void setScore(int score) {
		this.score = score;
	}

	public void setsecond(String second) {
		this.second = second;
	}

	public void setA(String a) {
		A = a;
	}

	public void setB(String b) {
		B = b;
	}

	public void setC(String c) {
		C = c;
	}

	public void setD(String d) {
		D = d;
	}

	public int getlevel() {
		return level;
	}

	public void setlevel(int level) {
		this.level = level;
	}

	@Override
	public String toString() {
		return second + "\n" + "A." + A + "\n" + "B." + B + "\n" + "C." + C + "\n" + "D." + D;
	}
}
